<template>
  <div class="developing-container">
    <div class="developing-content">
      <div class="pic-area">
        <div class="developing-icon">
          <div class="loading-wrapper">
            <el-icon class="loading-icon" :size="120"><Loading /></el-icon>
          </div>
          <div class="gear-wrapper">
            <el-icon class="gear-icon" :size="60"><Setting /></el-icon>
          </div>
        </div>
      </div>
      <div class="info-area">
        <div class="info-title">
          功能开发中
        </div>
        <div class="info-headline">
          {{ message }}
        </div>
        <div class="info-description">
          该功能正在积极开发中，我们正在努力完善系统功能，请稍后再来查看。
        </div>
        <router-link to="/index" class="back-home">
          返回首页
        </router-link>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref, computed } from 'vue'
import { Loading, Setting } from '@element-plus/icons-vue'

const message = computed(() => {
  return 'Druid监控功能即将上线！'
})
</script>

<style lang="scss" scoped>
.developing-container {
  position: absolute;
  top: 40%;
  left: 40%;
  transform: translate(-50%, -50%);
  width: 100%;
}

.developing-content {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  
  .pic-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    
    .developing-icon {
      color: #1482f0;
      position: relative;
      width: 120px;
      height: 120px;
      
      .loading-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        animation: rotate 2s linear infinite;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      
      .gear-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        animation: rotate 3s linear infinite reverse;
      }
      
      @keyframes rotate {
        0% {
          transform: rotate(0deg);
        }
        100% {
          transform: rotate(360deg);
        }
      }
    }
  }
  
  .info-area {
    flex: 1;
    padding: 30px;
    
    .info-title {
      font-size: 32px;
      font-weight: bold;
      line-height: 40px;
      color: #1482f0;
      opacity: 0;
      margin-bottom: 20px;
      animation-name: slideUp;
      animation-duration: 0.5s;
      animation-fill-mode: forwards;
    }
    
    .info-headline {
      font-size: 20px;
      line-height: 24px;
      color: #222;
      font-weight: bold;
      opacity: 0;
      margin-bottom: 10px;
      animation-name: slideUp;
      animation-duration: 0.5s;
      animation-delay: 0.1s;
      animation-fill-mode: forwards;
    }
    
    .info-description {
      font-size: 13px;
      line-height: 21px;
      color: grey;
      opacity: 0;
      margin-bottom: 30px;
      animation-name: slideUp;
      animation-duration: 0.5s;
      animation-delay: 0.2s;
      animation-fill-mode: forwards;
    }
    
    .back-home {
      display: block;
      width: 110px;
      height: 36px;
      background: #1482f0;
      border-radius: 100px;
      text-align: center;
      color: #ffffff;
      opacity: 0;
      font-size: 14px;
      line-height: 36px;
      cursor: pointer;
      animation-name: slideUp;
      animation-duration: 0.5s;
      animation-delay: 0.3s;
      animation-fill-mode: forwards;
      text-decoration: none;
    }
    
    @keyframes slideUp {
      0% {
        transform: translateY(60px);
        opacity: 0;
      }
      100% {
        transform: translateY(0);
        opacity: 1;
      }
    }
  }
}

@media (max-width: 768px) {
  .developing-content {
    flex-direction: column;
    
    .pic-area {
      width: 100%;
      padding: 10px;
    }
    
    .info-area {
      width: 100%;
      text-align: center;
      padding: 20px;
      
      .back-home {
        margin: 0 auto;
      }
    }
  }
}
</style>

